/*
 * @Author: szx
 * @Date: 2021-11-09 15:26:59
 * @LastEditTime: 2021-11-09 15:31:03
 * @Description:
 * @FilePath: \leetcode\100-199\162\162.go
 */
package main

import "sort"

func findPeakElement(nums []int) int {
	return sort.Search(len(nums)-1, func(k int) bool { return nums[k] > nums[k+1] })

}

func main() {
	nums := []int{1}
	print(findPeakElement(nums))

}
